//
//  DetailsTableViewCell.m
//  ECO
//
//  Created by zl on 2019/10/12.
//  Copyright © 2019 谷银行. All rights reserved.
//

#import "DetailsTableViewCell.h"

@implementation DetailsTableViewCell
- (UIImageView *)GroudView{
    if (!_GroudView) {
        _GroudView = [[UIImageView alloc]init];
        _GroudView.image = [UIImage imageNamed:@"背景"];
    }
    return _GroudView;
}
- (UIImageView *)imgV{
    if (!_imgV) {
        _imgV = [[UIImageView alloc]init];
        _imgV.layer.cornerRadius = 31;
        _imgV.layer.masksToBounds = YES;
    }
    return _imgV;
}
- (UILabel *)Name{
    if (!_Name) {
        _Name = [[UILabel alloc]init];
        _Name.font = [UIFont systemFontOfSize:16];
        _Name.textColor = [UIColor whiteColor];
    }
    return _Name;
}
- (UILabel *)yhID{
    if (!_yhID) {
        _yhID = [[UILabel alloc]init];
        _yhID.font = [UIFont systemFontOfSize:12];
        _yhID.textColor = [UIColor whiteColor];
    }
    return _yhID;
}
- (UILabel *)FsNum{
    if (!_FsNum) {
        _FsNum = [[UILabel alloc]init];
        _FsNum.font = [UIFont systemFontOfSize:12];
        _FsNum.textAlignment = UITextAlignmentCenter;
        _FsNum.textColor = [UIColor whiteColor];
    }
    return _FsNum;
}
- (UILabel *)YeNum{
    if (!_YeNum) {
        _YeNum = [[UILabel alloc]init];
        _YeNum.font = [UIFont systemFontOfSize:12];
        _YeNum.textAlignment = UITextAlignmentCenter;
        _YeNum.textColor = [UIColor whiteColor];
    }
    return _YeNum;
}
- (UILabel *)YjNum{
    if (!_YjNum) {
        _YjNum = [[UILabel alloc]init];
        _YjNum.font = [UIFont systemFontOfSize:12];
        _YjNum.textAlignment = UITextAlignmentCenter;
        _YjNum.textColor = [UIColor whiteColor];
    }
    return _YjNum;
}
- (UILabel *)FsTitle{
    if (!_FsTitle) {
        _FsTitle = [[UILabel alloc]init];
        _FsTitle.font = [UIFont systemFontOfSize:12];
        _FsTitle.textAlignment = UITextAlignmentCenter;
        _FsTitle.textColor = [UIColor whiteColor];
    }
    return _FsTitle;
}
- (UILabel *)YeTitle{
    if (!_YeTitle) {
        _YeTitle = [[UILabel alloc]init];
        _YeTitle.font = [UIFont systemFontOfSize:12];
        _YeTitle.textAlignment = UITextAlignmentCenter;
        _YeTitle.textColor = [UIColor whiteColor];
    }
    return _YeTitle;
}
- (UILabel *)YjTitle{
    if (!_YjTitle) {
        _YjTitle = [[UILabel alloc]init];
        _YjTitle.font = [UIFont systemFontOfSize:12];
        _YjTitle.textAlignment = UITextAlignmentCenter;
        _YjTitle.textColor = [UIColor whiteColor];
    }
    return _YjTitle;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.GroudView];
        [self.GroudView addSubview:self.imgV];
        [self.GroudView addSubview:self.Name];
        [self.GroudView addSubview:self.yhID];
        [self.GroudView addSubview:self.FsNum];
        [self.GroudView addSubview:self.YeNum];
        [self.GroudView addSubview:self.YjNum];
        [self.GroudView addSubview:self.FsTitle];
        [self.GroudView addSubview:self.YeTitle];
        [self.GroudView addSubview:self.YjTitle];
        [self Viewframe];
    }
    return self;
}
- (void)Viewframe{
    // 背景
    [_GroudView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(15);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(-15);
        make.right.equalTo(self.contentView.mas_right).offset(-15);
    }];
    // 头像
    [_imgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.GroudView).offset(17);
        make.left.equalTo(self.GroudView).offset(17);
        make.width.height.equalTo(@(62));
    }];
    // 名称
    [_Name mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.GroudView).offset(20);
        make.left.equalTo(self.imgV.mas_right).offset(14);
        make.height.equalTo(@(22));
    }];
    // id
    [_yhID mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.Name.mas_bottom).offset(15);
        make.left.equalTo(self.imgV.mas_right).offset(14);
        make.height.equalTo(@(17));
    }];
    // 余额数
    [_YeNum mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.yhID.mas_bottom).offset(23);
        make.centerX.equalTo(self.contentView);
        make.height.equalTo(@(21));
    }];
    // 粉丝数
    [_FsNum mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.yhID.mas_bottom).offset(23);
        make.left.equalTo(self.GroudView);
        make.right.equalTo(self.YeNum.mas_left);
        make.height.equalTo(@(21));
    }];
    // 佣金数量
    [_YjNum mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.yhID.mas_bottom).offset(23);
        make.right.equalTo(self.GroudView);
        make.left.equalTo(self.YeNum.mas_right);
        make.height.equalTo(@(21));
    }];
    // 余额
    [_YeTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.YeNum.mas_bottom).offset(6);
        make.centerX.equalTo(self.contentView);
        make.height.equalTo(@(18));
    }];
    // 粉丝数
    [_FsTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.YeNum.mas_bottom).offset(6);
        make.left.equalTo(self.GroudView);
        make.right.equalTo(self.YeTitle.mas_left);
        make.height.equalTo(@(18));
    }];
    // 佣金数量
    [_YjTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.YeNum.mas_bottom).offset(6);
        make.right.equalTo(self.GroudView);
        make.left.equalTo(self.YeTitle.mas_right);
        make.height.equalTo(@(18));
    }];
    
}
@end
